package com.wlc.base.design.strategymode.v2;

/**
 * @author 王立朝
 * @date 2022/3/16
 * @description:
 */
public class CashFactory {
    public static CashSuper createCashAccept(String type) {
        CashSuper cs = null;
        switch (type) {
            case "正常收费":
                cs = new CashNormal();
                break;
            case "满300 返100":
                cs = new CashReturn(500.0,200.0);
                break;
            case "打八折":
                cs = new CashRebate("0.8");
                break;
        }
        return cs;
    }
}
